package ar.com.ctrln.persistence.dao.vehiculo;

import org.hibernate.Query;
import org.springframework.stereotype.Repository;

import ar.com.ctrln.persistence.dao.AbstractHibernateDao;
import ar.com.ctrln.persistence.model.vehiculo.Vehiculo;
import ar.com.ctrln.persistence.model.vehiculo.DisponibilidadCar;

@Repository("vehiculoDao")
public class HibernateVehiculoDao extends AbstractHibernateDao<Vehiculo> implements VehiculoDao {
	
	@Override
	public Vehiculo findVehiculoById(long id) {
		Query q = getSession().createQuery("from Vehiculo v where v.id = ?");
		q.setParameter(0, id);
		return (Vehiculo) q.uniqueResult();
	}

	@Override
	public Vehiculo findVehiculoByDisp(DisponibilidadCar dip) {
		// TODO Auto-generated method stub
		return null;
	}


}
